package com.kaluli.project.repository.impl;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.http.client.utils.DateUtils;
import org.springframework.stereotype.Repository;

import com.kaluli.project.domain.entity.KllMainOrder;
import com.kaluli.project.domain.entity.KllMainOrderDetail;
import com.kaluli.project.domain.entity.KllPurchaserAuth;
import com.kaluli.project.domain.repository.KllMainOrderDetailRepository;
import com.kaluli.project.domain.repository.KllPurchaserAuthRepository;
import com.kaluli.system.repository.AbstractRepositorySupport;

@Repository
public class KllPurchaserAuthRepositoryImpl extends AbstractRepositorySupport<KllPurchaserAuth> implements KllPurchaserAuthRepository{

	


	public KllPurchaserAuth findByUid(int uid) {
		StringBuffer hql=new StringBuffer(" from KllPurchaserAuth t  where  t.uid=:uid  ");
		Map<String,Object> params=new HashMap<String, Object>();
		params.put("uid", uid);
		List<KllPurchaserAuth> list = findHqlForMap(hql.toString(), params);
		KllPurchaserAuth main = null;
		if(list!=null&&list.size()>0){
			main = list.get(0);
		}
		return main;
	}

	@Override
	protected Class<KllPurchaserAuth> getEntityClass() {
		// TODO Auto-generated method stub
		return KllPurchaserAuth.class;
	}
}
